package m.jclecai.com.adapter;

import android.content.Context;
import android.view.ViewGroup;

import java.util.List;

import m.jclecai.com.R;
import m.jclecai.com.adapter.base.ViewHolerAdapter;
import m.jclecai.com.adapter.holder.BetScf_RjcHolder;
import m.jclecai.com.bean.Content;
import m.jclecai.com.listener.NotifyTextViewSetChanged;

/**
 * Created by ZD on 2017/6/3.
 */

public class BetSfc_RjcAdapter extends ViewHolerAdapter<BetScf_RjcHolder> {

    Context mContext;
    List<Content> mData;
    NotifyTextViewSetChanged changed;
    String perfix;
    public BetSfc_RjcAdapter(Context context, List<Content> data,
                             NotifyTextViewSetChanged changed,String perfix) {
        this.mContext = context;
        this.mData = data;
        this.changed = changed;
        this.perfix = perfix;
    }

    @Override
    public BetScf_RjcHolder onCreateViewHolder(int position, ViewGroup parent) {
        return new BetScf_RjcHolder(mContext, R.layout.item_sfc_rjc);
    }

    @Override
    public void onBindViewHolder(int position, BetScf_RjcHolder betScf_rjcHolder) {
        betScf_rjcHolder.init(mData,changed,position,perfix);
    }

    @Override
    public int getCount() {
        return mData.size();
    }
}
